/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.source.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 节目包管理Entity
 * @author ZC
 * @version 2017-05-25
 */
public class EleSource extends DataEntity<EleSource> {
	
	private static final long serialVersionUID = 1L;
	private EleSourceGroup group;		// 资源包 父类
	private String type;		// 资源类型
	private String name;		// 节目名称
	private String content;		// 内容
	private Date startDate;		// 开始日期
	private Date endDate;		// 结束日期
	private String startTime;		// 开始时间
	private String endTime;		// 结束时间
	private String sort;		// 优先级
	
	public EleSource() {
		super();
	}

	public EleSource(String id){
		super(id);
	}

	public EleSource(EleSourceGroup group){
		this.group = group;
	}

	@Length(min=0, max=100, message="资源包长度必须介于 0 和 100 之间")
	public EleSourceGroup getGroup() {
		return group;
	}

	public void setGroup(EleSourceGroup group) {
		this.group = group;
	}
	
	@Length(min=0, max=255, message="资源类型长度必须介于 0 和 255 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Length(min=0, max=255, message="节目名称长度必须介于 0 和 255 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}
	
	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}
	
	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}
	
}